]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Ensure to let focus manager handle key events
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 1 Feb 2022 13:33:03 +0000 (14:33 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 1 Feb 2022 14:30:24 +0000 (14:30 +0000)
Since the grab no longer lets events bubble up to the stage unstopped,
we should be forwarding the key events that bubbled up to the dialog
to maybe cycle focus.

Fixes broken keyboard navigation in several context menus around the
shell, other than the panel ones.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2140>

js/ui/popupMenu.js

index a0c00067d1eb7f7bcd8f0b25c5ed9cdb449ce6bc..b464673626d2d3d1a22d7d4f57f5c8cf7a9b1bbc 100644 (file)
@@ -154,6 +154,9 @@ var PopupBaseMenuItem = GObject.registerClass({
     }
 
     vfunc_key_press_event(keyEvent) {
+        if (global.focus_manager.navigate_from_event(Clutter.get_current_event()))
+            return Clutter.EVENT_STOP;
+
         if (!this._activatable)
             return super.vfunc_key_press_event(keyEvent);